/**
 * Copyright (c) 2014-2017, huli.com
 * All rights reserved.
 */
package com.xiaohujr.xuexue.rabbitmq.main;

import com.xiaohujr.xuexue.rabbitmq.Producer;
import com.xiaohujr.xuexue.rabbitmq.constants.RabbitConstants;
import com.xiaohujr.xuexue.rabbitmq.interfaces.ConsumerHandler;

/**
 * 接受测试.
 *
 * @author Xue Xue (xuexue1@huli.com)
 * @version $Id$
 * @since 2018/4/19
 */
public class ReceiveMain {
    public static void main(String[] args) {
        Producer.ConsumeMsg(RabbitConstants.DEFAULT_DIRECT_QUEUE, new ConsumerHandler() {
            @Override
            public void handleMsg(String msg) throws Exception {
                System.out.println(msg + "------received!");
            }
        });
        Producer.closeConn();
    }
}
